package org.example.laboratorymanagement.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.laboratorymanagement.pojo.Labor;

import java.util.List;

@Mapper
public interface LaborMapper {


    List<Labor> listLabors(@Param("name") String name,@Param("local") String local, @Param("equipment") String e);

    void delete(List<Integer> ids);

    void update(Labor labor);

    @Select("select id,name,local,equipment from labor where id = #{id}")
    Labor selectById(Integer id);

//    @Insert("insert into labor(name, local, equipment) values (#{name},#{local},#{equipment})")
    void insert(Labor labor);

    @Select("select id,name,local,equipment from labor")
    List<Labor> selectAll();
}
